Regarding the electrolytes ... they are just minerals like salt, potassium, calcium, and a handful of others.
I use electrolyte tablets which you can get from Hammer Nutrition, or sometimes from a local health food store. On somewhat longer rides, I take one before the ride, and sometimes one in the middle of the ride. If the ride is quite long, I might take more ... approx. 1 every few hours.
In addition to electrolyte tablets, I consume foods with electrolytes ... three of my favourites are salted almonds, beef jerky, and potato chips.
I've actually stopped drinking sports drinks ... I think the last time I used a sports drink was back in October or November. So I cycled all summer without sports drinks.