Fixing tests and lint errors