cleanup module code