Refactored head/dept lock api

tested on rov