Cleaning up code some more