doc and blocks are now instances carrying their own data