Added server state saving. -ZM and PR