Added proper serialization for empty strings.
Added *~ to .gitignore.
Implemented generic event filter functionality.