PEP8
Remove unused imports
Set up logging in h.script