Plug in UMD definition; More refactoring