Split setup, decode, and tidy up of "online-python-decode"

Absolutelly untested. It needs a lot of polishing.