Added module function file and more stuff for modules