cleanup
minor revisions
further refactoring
further JS cleanups
finalized js cleanups