Trimming some newlines in module.cpp
Clarifying error message when instance is not instantiated.