Locking of code

Låst objekter for at sikre mod deadlocks
Merge remote-tracking branch 'origin/LassesLOCKS' into ClientStuff