Broke up Main.hs and moved most of it to Connection, then added logging
Primitive client is functional, but its api interaction is still awkward, we should polish the api some more