Move LOS code around