Added triggers for date update and changed design of some tables