register.js cleanup