- Cleaned up the code so that it is in a basic broken condition.
   simple fixes with semaphores will make this code work.