Removed min, max, and restore functions.