Reorganized modules.
Minor refactoring and/or debugging.
Changes according to module reorganization.