Refactor jsonp

Hey @shtirlic 

I've refactored the `jsonp` logic a bit just to make the logic more readable. Let me know your thoughts on it. All the tests continue to pass. The commits should show the process a bit but please do mention any concerns.

Thank you for the extension btw.