Made a makefile and fixed some concurrency issues. Still more concurrency to go