Cleaned up a bit.
Updated documentation, tutorial. Cleaned up code a bit.