UI fixes.

Layout tuning. Don't show properties if nothing selected.
Remember selected device.