update module and cleanup