cleaned up javascript file structure.
Merge pull request #9 from Capsul/html_spiking

cleaned up javascript file structure.