fixed missing import statement
Refactored output from history and info commands, with more complete implementation