Insignificant, but I would change this:

Code:
if IRBUTTON=5  then
loop:
toggle Sonyled
 
endif

To this:

Code:
if IRBUTTON=5  then toggle Sonyled