core javascript initiation file

this needs to be pushed to master at some point.