UI tweaks and code formatting