Cleaned the code a bit (2/?)