Added some configuration logic