Add functional tests and Travis config