Fog object refactor

Hi, these two commits refactor all the pt_* methods into one object. It gets rid of all the redundant argument passing.