Correct return types, update documentation