Add better documentation.

This commit converts the old documentation style to one that Xcode can
understand. It also adds documentation to many properties and methods
that were previously undocumented.