Move configuration to it's own method