Bug fix: wait_tim information was not stored when allocating a wait timer
Implementing semaphores. INCOMPLETE