Added cleanup to processor