more idiomatic application.js from Michel