Removed unused imports and minor code cleaning.