Cleaned up

Cleaned up, added documentation, and added examples.