Just fixed and a bit rewrited History stuff for DB