Managed to get things working on incoming by adding some 'use' statements and adding reborrows in model::build_kd_tree.