Refactor reorganize and add haddock documentation

This also makes a small change to the exposed API, both as far as what
functions are exposed and the actual API - `newZulip` had a small
modification to its arguments.