Remove unneeded calls to with and minor typehints and docblock fixes