Permutation Testing And Semiparametric Regression: Efficient Computation, Tests Of Matrix Structure, And L1 Smoothing Penalties