removed unused imports, reduced visibility of variables where applicable