Refactoring of passes