Minor cleanup of save function.  Fixes #5.  Fixes #2