fixing up permuted safe / unsafe ffi calls, clarifying haddocks, and other fun things