Fix completion of types inside a MethodReceiver.

Tweaked the close() call inspection.
Imports cleanups.