Add tests and travis-ci config