Renamed 'app' to 'application' and added shutdown() method.