Restrcture the resize pupsave mechanism