Backend refactoring - moved protocol to separate project.