Simple utility for saving and restoring values of object properties