Corrected some mistakes
Added some locking documentation.