Optimize cuelines and other childwindows.
Refactory.