Refactored some old snake game to match task requirements