Added options for flags, ports, and base json output.