Syntax changed in #report_error, #report_success. Code refactored.