improved the handling of names in lights

Signed-off-by: Martin Evans <martindevans@gmail.com>