Merge old lib functions into this