Some more updates - started plugging in the state table and semaphores