Added RF collect and distance code etc