Visual tweaks and refactoring