Fix dependencies on other modules' variables

Also moved all proxy-related stuff to it's own class, for cleanliness