Some very basic refactoring