Improved layout of code for better readability