Cleanning up the code