Code refactoring, code fixes, useless stuff