Scripts now fully load before starting
Made main script into separate js-file