All fptr should be renamed to handler (or something similar).