cleanup of logic parts