Implement middleware
Readme, tidy comments
Add .travis.yml