LightRS: refactor and keep up to date