Big overall commit: refactored existing code and added some new functions in the new EditingToolBar