clean up dirty __import__ code

import should be done top-level?