Changed exports object of the elasticsearch to be a function. Changed module instantiation logic to pass an instance of the webtail server to this function. Updated documentation. TODO: Improve documentation.