Moved some things around, added more documentation.
Included documentation.