more code cleanup, remove unused imports etc.