Formatted output and set up for terminal

Formatted output so that it no longer just prints list. Set it up to
run from terminal as well