lighirc: cleanup code