Clean up the function some more
Fix docstring
Remove unused import
Tweak return docs