cleaning record.js controller