Added configuration logic to a separate module