Merge "Moved $function definition up to make IDE happy."