As I said the code works on iPad using inline SVG code with headers and paragraphs appearing under the SVG graphic like they should. After converting the ePub to mobi with the Kindle Previewer and unpacking it with Mobi Unpack to see what it had done with the code, I saw too my surprise that it had made the inline SVG code into SVG docs/images and added them to content.opf. I am guessing that this is somehow connected to why they display on their own page now.
I will see what I can come up with to fix this. I will also take what you said dgatwood into consideration and see if it helps. Thanks for the info.