Now cleaned up to only use regular objects for session and environment