removed commented out and unused parts of code, also unused variables and imports. Added a bit of alignment.