Migrated to reutrn codes.
Improving snapshotting.
Added check for running on rollback.
Fixed bug in memory reporting.
Merge branch 'test' into dev