Refactoring to avoid a global board variable