add docs, better error handling, add Travis CI