moved config to it's own folder. Adding environment checks