Refactored startup, so that UPnP works now