Refactor page asset loading and error checks into Handlebars helpers; tidied package.json