Restructured class and removed unused imports