Fix undefined sleep()
Remove unused imports
Make pylint happier for no particular reason