some efficiency improvements, mostly in pde-solver