Fixed spelling mistake.
Lots of refactoring.  We can almost persist copybeans.