Add travis and fix tests