Refactored game after watching solution videos.