Cleaning the code a little bit