Documented almost everything

Lots of comments.
Fixing #1