fix ID references, fix WG element, fix AREA element, remove unneeded emp...

fix ID references, fix WG element, fix AREA element, remove unneeded empty elements