removed unused imports, added curly braces to if constructions, replaced spaces to tabs