Fix lint errors and add compatibility with travis