Updated all the documentation, and fleshed out the last of the TODOs