Migrate javascript app file to work with new initjs
Use modules feature from initjs