Account for missing data and other data names
Support for frlib
Robustify code
Only use involved variables