Refactoring to share temp_shown class between modules and callbacks