Refactoring hardcoded events to constants in separate class; plus fixing code according to PSR-2