spn_events refactor
refactoring and adding features