Moved protocol code to a new file
Period work. Tooooooo complex to complain with several words