More backend stuff for linearpattern (ongoing)