code cleanup and comments
code cleanup and comments