Test for and add <target/> element
Formatting updates