Got speed improvements, but we could push it further. Commented out the add references and layouts stuff to see how fast it can go, but that introduces regressions. So will need to uncomment that bit out, or fix it up.