update loki: fix all compiler warnings, restore licence and readme files