Begin of resuable create/edit customer logic.