Started documentation!

Oh boy here we go. Also fixed some bugs thanks to documentation.