Breaking out flare mechanism into its own file