Fix linting and consistency issues