Refactors saving location