Added JS files so that project can run without Internet connection.
Refactored code so that clustering code is more stand-alone.