Fixing linting and syntax errors