Add tests, integrate Travis, fix docs