Add travis CI support, fix some lint warnings and errors.