Refactoring feedback.js