First working commit

The api ignores all input and returns the results as though the
requested url was 'http://squidwrench.org'
Factor out api stuff to make main cleaner