Fixed mutex lock conflict...
A few changes... read below.

Previous commit was wrong. This undoes that commit.
It also fixes a memory leak...
Not gonna lie, I'm not too fond of the linked list API.