Did some code cleaning