V2 doc

An unsatisfying amount of documentation, but slightly better than none.

Also, eliminates the warnings during compilation.