Integration RMC protocol

* Refactor lock handling
* Add lock/unlock statement to container