Added threads and Lock

Further improvements in the pipeline.
WEBSIS IS DOWN. -_-