Clean up

Cleaned up some stuff and added some of the documentation.