Removed unused imports and added useful comments.