slit CreateProxyClass() into methods for better readability