The parser now trims padded states and events.

Also added more tests and updated the README.