cruft removal
add optional logging of request and response