change tabs to spaces

accidentally used tabs instead of spaces
prevent accidental execution
add outfile command line param
move website request to function
refactor state tag extraction to a function
break out line parsing into a function
add unit testing for line parsing