Further improvement of ling code

Yadda yadda