Added a significant amount of documentation