Added ability to make autostart optional