Added extendModule function to code lib