Cleaning up code for readability