Moved configuration handling to it's own deal