Fix docs and prettyprinting