add docstrings, allow server host to be passed into constructor