commit to merge at pull
complete refractoring storage function code. added a skeleton of undo function class.