Made changes to makefile
Switched from TVar to MVar for shared data, added `local` shared data to avoid reading/writing in multiple modules