Add Event Functionality implemented + some refactoring