Rearranged into a cargo package and factored out some useful functions into their own library.
Added file for Travis CI.