Cleaning a little of the code