You might be able to do a creative REGEX (or use the toolbag plugin) to replace all TAG instances of
<p class="foo">
with <h3> and you can tick the box to optionally keep the class assigned
also

the TOC tool will use the value from
title='short name here" if it is present, instead of using the header (visible) text