Some updates.
Added comment regarding lock. Need to clean up.