Move module functionality into NPMap.Module module and add support for modal