CustomFormatter refactored, imports optimized
Unused imports removed