All public functions and properties now has some sort of documentation

Rewrote some of the more horrible api design mistakes in the process.