Another tweak to whereami
Shell history. Some quick refactoring