Fixing register.js 'js hint' problems