Now compiles in accordance to move semantics, etc. Also fixed and refactored some things, sorry about the mega commit.