Add dispose method to modules