Prepared for implementing multithreading. Working properly.
Generalizing lists into gstack_t's.