refactored persistent storage methods into own class, also actually save process env vars