Miniature prune.
Improves enumerated type helpers, not that it matters :(
Adds main-thread-check assertion.