clean up module code