Remove unused imports

Remove unused variables
Fix syntax error