Simplify error checking.
Add a function for converting a payload into the enhanced format.
Add a basic Travis-CI configuration file.