added origin setting to lkey
misc changes