Add triggers for comments and pms. Remove useless code replaced by the triggers