Added first attempt at locks with test script
Added debug statements