Lots of refactoring/etc work.