some cleanup of matches.js and controller