Simplify module template logic