bugfixes, optimizations
optimizations, bugfixes, partial history impl