Migrating escape sequence logic to be scalable.