clean up capes.js