Many code refactorings