Fix discrepancies between function signatures in headers and documentation