Refactor _codes_tracker.js