fixed unit tests, improved annotions for custom repository class, added events class