organized comments, fixed function hoisting, minor tweak to build