Started debugging after finishing the threaded logic. Fixed some major bugs, but still having some left.

Currently there is a problem with the communication between the buffers