added a large amount of documentation.