Cleaning unused imports and changing variable to field for efficiency