Add hooks for dump/restore. Fix whitespace.