Cleanup and middleware demo