So, I purchased two new Kasa lightswitches to replace two standard switches in a 3-gang box and encountered a lot more than I was expecting. Almost every cable looks to be black, which is not what I expected at all. I feel moderately handy and have swapped out several other switches and outlets in the house, but this one is really stumping me. 

[![far left lightswitch][1]][1]

The far left switch has a red wire on the top left (I'm assuming it's going back to the wall since it's definitely a three way), then a wire coming from the wall into the top right screw, then another one from the wall going to the bottom right screw. I have no idea what either of those two screwed wires are (load vs. line).

[![middle lightswitch][3]][3]

Where it gets fun is that there's ANOTHER wire plugged into the back of the switch that leads into the back of the second switch, with a wire screwed into the top right coming to/going from the wall, and another wire screwed into the bottom right to/from the wall – but THAT wire loops around said screw before plugging into the bottom of the third switch. There is also a wire coming out of the top on the back of the switch that goes to/from the wall.

[![far right lightswitch][2]][2]

Taking a step back, this is kind of a mess (to me – this may be normal for electricians!)

[![all three switches][4]][4]

[![enter image description here][5]][5]

So, where it really gets fun is that I'm trying to figure out what goes where in the back of these Kasa switches. One is a three way (replacing the middle switch which I know isn't a three way switch) and the other is a dimming switch (replacing the far right switch).

[![three-way switch, replacing middle switch][6]][6]

[![dimmer switch, replacing far right switch][7]][7]

So, as of now, I feel pretty stuck. I'm going to put all three back in their places and turn power back on, but wow.

  [1]: https://i.sstatic.net/whwuV.jpg
  [2]: https://i.sstatic.net/zHGCC.jpg
  [3]: https://i.sstatic.net/ZgXFj.jpg
  [4]: https://i.sstatic.net/4kSms.jpg
  [5]: https://i.sstatic.net/LBJdV.jpg
  [6]: https://i.sstatic.net/lEp17.jpg
  [7]: https://i.sstatic.net/yPzkN.jpg