Moved commitAndBegin to MainController from Share