Started to clean the code