BUGFIX and refactor

Fixed a bug when trying to move root task.
Splitted some large methods in GridEditor.
Introduced some early returns in long methods.