in reply to large expression formating

You might want to take a look at TheDamian's module DFA::Cellular.

Your application looks very suitable for it.

I was introduced to this module at a talk he gave in London in September.