Added within-main-loop and call-from-main-loop macros; ensured single initialization...