Factored out receiver
Missed mutex pointer assignments added
Made threshhold variable
Missed file