localize some imports

There are no strict policies about it I am aware of. I personally would favor such style (beginning of scope) too but it doesn't seem critical.