remove. Move pattern compilation to constructor