fixes to mirroring, plus adding mirroring versioning scheme which makes is easy to invalidate previous localStorage mirroring data (just by changing th eversion number)