attempt to fix warnings
fix bug in new leveled lock fcn
fix warnings and improve test
Merge branch 'master' into logan