Refractor savehelper
Refractor some code