There's a lot of QueryString instantiations (I counted 6), they don't seem to be all necessary in the end (the exception are those in the setupImage function -  could be cut down only to 2 using a check at the end of the function instead of placing one in each case of the if/elseif/else construct -  since they need the current URL to operate on).

Overall 2 cached instances would work (one local to the setupImage function, another one local to the module for all the other methods to use).

Spoke with @hakubo  and that seems to make sense.