Tidy up/reorganizing proxy configuration
Added proxy authentication
Make proxy api simpler