Lots of refactoring, lots more consistency