Added autoregistration to IoC. Bugfix graceful shutdowns