Change location of attachToContext, and add NLContext#runEventLoopSync