- refactoring for S

So instead of one huge function that does all the saving we've busted
this down in to 2 functions.

Our first handles the processing of the caps/nonce and then hands off
the saving.

This makes our first function waaaaay easier to read and also keeps up
with single responsibility.