Made a clean-up of the code