closes #14

splitting JS into proper files in new dir