Fix a bunch of things including history bug.
Merge branch 'frontend' of https://github.com/StickMen/KungFuRhino