Refactoring the wlm_get_form function...