Added documentation

* Added better documentation
* Formatted for docco