Misc code formatting and consistency