added orange highight for warnings
corrected cleaning loop when nothing in DB and added pbody check on relationship