Added print off function

Added a print off function. Fixed some minor commenting and bugs.