Added in history management and sane keys