Half way through optomising and splitting script.js into AMD modules