updated lib with refactored grid.rb and cell.rb