Added restart collection service. Improved application shutdown procedure.