DB triggers + Debug scripts updated