Fix lint errors and remove unused cose