Add tests and Travis CI