Refactoring lots of stuff;