Use constants for the ES proxy

  * Also alter the code that works with Kibana MS-5