Add mutex locking to more functions.
Merge pull request #16 from PreetamJinka/issues/15

Add mutex locking to more functions.