Add tests and TravisCI support