cleanup: make functions; make variable names more descriptive
BUGFIX: fix here document usage error
Merge branch 'cleanup'