Refactors game controller