Inital refactoring, breaks build