code cleanup and documentation
finished updating documentation