Reorganizing refactoring

Just some simple refactoring, nothing too fancy ;)