Added include
reintroduced shutdown function