Deserialize history

Anyone want to review this?

/cc @proby @benkirzhner