move all the js from inline to YAML refs