Moved DECOF_DECLARE_EVENT macro to event.h.
Added userlevel feature.