[GPIO] Cleanup web UI code a little to make it simpler