Moved autoconfiguration to separate file