Refactoring and working on multiplayer