Update Tool and target templates to match changes in the Java build

This commit also fixes #25