Code cleanup, minor UI tweaks