Various UI tweaks. I'm sorry these commit messages suck.
Blog post: Refactoring - Making use of database functions