Clean up stanza code