Moving set_up_logging() inside "main"

This means that tests will continue to use stdout/sterr
Moving imports

Imports should have been moved as part of my last commit