bring in code for local serve

and rename functions from init to more specific(saveServer,saveLocal)