Finished implementation, first major commit.

Requires documentation and removal of unused methods.