Refactor chat controller
Refactor Player.js