Fixed some small errors, added more docs