Small refactor and xslt updates to support code examples on types