Added filters and events
Some refactor