more cleanup, added triggers