move pass-refactoring into its own source files