Proper typing of auxiliary functions.