locking timeout fixes and performance tweeks
code sniffer
Need to unlock with super user always