Fixed clearMessages() function -- options param was in DOCS, but weren't supported in code.