Apply fixes for the interface.
Combines imports from the same module.

The previous code used a single import statement for each value that was
imported. Thus importing `a` and `b` from module M would result in:

import M(a)
import M(b)

The new code merges these two import statements into a single

import M(a,b)

The order of imports has also changed due to the changing implementation the
imports are now ordered by their ModuleName.