Add type checking and so forth, use LWP::UA mock to speed things up