Include all properties while serializing.
Use constant to define the event name.
Hotfix for issue 292.
Fix code style issues.