minor cleanup and added comments

added descriptions to functions, as well as to cleanup some code that
had previously been commented out. tested in both local dev and 'cloud'
before this update: 4:23 am