bug fixes, enhancements, refactorings in ModuleApp