Fixed some documentation issues and some bugs