Refactoring the matlab binding for prototxt file manipulation.