Split template into header and body. Updated definitions for diet attributes. Added agent definition