minor code refactoring. removed unused imports.