New database design, fix history, implement revision comparison (diff)