Refactored internal gridModel of puzzle class