made better json persistence calls
small refactors on main