Completed refactoring of protocol