Improved layout and code style