Added CompoundEvent and Entities improved

Requires database update