Refactor of gem to persist jobs and sessions.