Renamed variables and commented code for readability

Renamed panes and variables so that the names were relevant (instead of panel_1, panel_2, etc.). The new variable names should help to make the code self-documenting. Comments were also added to help distinguish which areas of code corresponded with which panes.