Implementation of init, add, commit