Added commit and rollback to controllers