Improved layout and code