Re-wrote create_function calls to PHP 5.3+ anonymous functions