Changed protocol name and made two new functions for json and clean text for better structure