Remove duplicate logic blocks