refactored db connection code to be done once. Added cf_score from parent addition to distance. Refactored preprocessing to call into pardora_db