Created a working generic interleaver.