Updated to include psuedocode for proxy support

This contains a starting point of working code (minus IP addresses) for refactoring.