Full implementation of shutdown service