Refactor the protocol basic class