More grid refactoring. Still a bit buggy.
Fix bug when resizing_right close to edge.