Changed from forking to threading, got shared dictionary working. TODO protect shared data structure