Copy formatter utilities from spotlight, plus dependencies

can we leave this as is and just fix the offending line.