js tidies up into seperate file, markers added, much more working