Adding dataframes support, remodeled after GLM approach