Done some very basic refactoring