Refactoring with new protocol buffers model