WIP: started ripping up the global variables into the context struct to enable running multiple brains at the same time and for cleaner interop
Finish the conversion to context from global variables