update to work with new lock system, add protocol.* to build system