Added replaceAmpersand method in API class