Made Thread API. UNTESTED
fixed DataAPI screwups