Minor bug fixes
Fixed trigger function and removed faulty constraints; revisioning now works exactly as intended