Stripping debug logging and unused imports