Moved select() into functiontools.