Comments Added

Added comments and cleaned up code some more.