Fix merge issue with modal function editor
Clean up messy param passing pattern