Added tests and travis-ci integration.