Further refined Line Of Sight code to work better and look cleaner