Save more history, use up, down keys, remove unused lines