better and simpler history nav
refactor editor code a bit
wip on refactoring, currently broken