Added blocking queue and fixed linker errors