Rewrite and try a different approach

Doesn't do much yet, only enumerates threads and tags them based on which
APIs are used.