restored try catch in Commit. ad cosmetic changes