Done about 80% of the work

Should add the snapshots and other related things in some time.