Bug fix and big refactoring
1. Bugfix the cancelation of selection by body click was not work when the space between top line of the editor and the control has been clicked.
2. Bugfix a relation was pointed down when the predicate has been changed.
3. Extract many modules.
4. Move modules to folders per functional group.