More housekeeping/Modularization

I reformated to add a few newlines between functions.
I also made our extremely long strings (i.e. the queries) into multiple lines.
Turned command line parsing into it's own function(tested it as well).