Best way for multiple dynamic settings?

So, I have a service add-on where you set a Pin and Function and it will trigger that function when the pin rises or falls.

I want to extend it to be able to have multiple pins to monitor.

How would I accomplish this in the settings.xml?

My thinking is:

<setting id=”pin-1″ type=”slider” label=”30000″ default=”0″ range=”0,1,40″ option=”int” />
<setting id=”edge-1″ type=”select” label=”30001″ default=”0″ value=”0,1″ lvalues=”30101|30100″ />
<setting id=”function-1″ type=”text” label=”30002″ default=”ShutDown” />
<setting label=”32033″ type=”action” action=”RunScript(my.addon.id, removepin-1)”/>
<setting label=”32032″ type=”action” action=”RunScript(my.addon.id, addpin)”/>

The addon would then write the below to the settings.xml file and then reload the settings window

<setting id=”pin-2″ type=”slider” label=”30000″ default=”0″ range=”0,1,40″ option=”int” />
<setting id=”edge-2″ type=”select” label=”30001″ default=”0″ value=”0,1″ lvalues=”30101|30100″ />
<setting id=”function-2″ type=”text” label=”30002″ default=”ShutDown” />
<setting label=”32033″ type=”action” action=”RunScript(my.addon.id, removepin-2)”/>

So, the new settings file would like look

<setting id=”pin-1″ type=”slider” label=”30000″ default=”0″ range=”0,1,40″ option=”int” />
<setting id=”edge-1″ type=”select” label=”30001″ default=”0″ value=”0,1″ lvalues=”30101|30100″ />
<setting id=”function-1″ type=”text” label=”30002″ default=”ShutDown” />
<setting label=”32033″ type=”action” action=”RunScript(my.addon.id, removepin-1)”/>

<setting id=”pin-2″ type=”slider” label=”30000″ default=”0″ range=”0,1,40″ option=”int” />
<setting id=”edge-2″ type=”select” label=”30001″ default=”0″ value=”0,1″ lvalues=”30101|30100″ />
<setting id=”function-2″ type=”text” label=”30002″ default=”ShutDown” />
<setting label=”32033″ type=”action” action=”RunScript(my.addon.id, removepin-2)”/>

<setting label=”32032″ type=”action” action=”RunScript(my.addon.id, addpin)”/>

Thoughts?

Or, would it be best to keep these settings out of settings.xml and have own GUI for creating / removing them and store them in a simply JSON file or DB?
If so, what’s the best way to do GUIS these days that are skin neutral?