Add typespecs to the functions