Created a shutdown Sequence

Trying to figure out how to gracefully shutdown everything