Updated save function to include a bit more info.