Clean up imports

Avoiding `import *` where possible, removed unused `re` module.