Add methods to add objects for a given key
Fix leak