CLOUDIFY-2042 Some refactoring and added a uint test for proxy configuration