Implement "layer switch memory"

- When no layer switch is given in command, get it from the field
(default: f)
Optimize code for "g" command
Correct regex for layer switch
Clean up
Clean up
Implement simplistic layout algorithm to calculate x value of newly
created nodes in editor
Clean up
Implement simple layout algorithm