Extract the resty function into .functions