Abstracting out the job group memory storage

so that making a more persistent store in the future is easier.  Also
cleaned some stuff.  You know... programming.