Changes to clean up the code