Lots of code cleaning, refactoring, etc...