cleanup react code