Fixed some bugs in testing and writing documentation as well as added some additional documentation and refined the format of the documentation.