Fixes in markup and triple generation logic