More python code split, tweak plugin-edit window