Refactor history subcommand and formatting. Update README.