introduce macros to make threading, ownership, and lifecycle semantics explicit; do some minor refactors
make threading semantics clearer