Cleaned up the gnarly getThreadItem functionality.