Make `undefined_module` error contain module name

I got a complain from my colleague that `undefined_module` error does not tell what particular module was undefined. This pull requests addresses that deficiency.

Besides it brings some empty line cleanup.

So only the first commit, which is really small, contains code changes. The second just removes extra empty lines.