tightened functions. Removed obsolete debugging code. created warning function for validation triggers.