Add perpetual code

@mortenvp @janusheide I will try to update this branch with the master. We should release perpetual NC soon.
```
m_max_seen_width = std::max(m_max_seen_width, width);
```