Updated some locks and comments