added newbranchdialog and changed the checkoutbranch function, more dev into dirtyhandler class.