Improve coding style

Mainly unified imports and stripped obsolete NOQA comments.