Refactor optimizations passes: one per file