Fix lint errors and warnings