cleanup bad code