updated model-events

- added check for empty categories/data, if no data then an array will
be returned.
- removed obsolete code