Refactored game stuff into new class for clarity