Replace local functions with existing modules