Replaced obsolete opp_error calls as suggested by documentation.
Replaced obsolete functions with new variants as suggested by the documentation.