clean up errors and warnings