Moved semaphore and queue inits to main.c