refactoring, not finished
Refactor grid.rb for testing
Merge branch 'grid' into development