cleanup AMD local module and define variable defs.