separated js into seperate file

finished first working build.