GameofLife refactored