Added preliminary new lgd-script (need yet to add legacy support)