initial commit, javascript refactored into src files