Change raw Exception to ParseError/EncodingError.
Refactor a few methods for generating values of parsed elements.
Add Travis-CI.