More documentation, slightly stricter types.