Miscellaneous bug fixes and visual tweaks