cleaning up module code