Making badges-permissions-model.js a thing of beauty