Add tests and Travis CI support