Allocate refactoring

Refactor with_save and save into one method accepting an optional block.