Code cleaning (remove unused imports and update docstrings).