minor fixes + added some missing logic

to enforce the property of committing only the most recent value for a given key