Fixed some bugs
Added snapshotting, recover, supervision and logging
Added stats