Some cleanup.
Added some backup rollback logic.
Added debug output for rollbacks.
Merge branch 'test' into dev