Added headers and DB cleanup checking