refactored events

refactored events initializing, css changes