Add support for multiple kernels.
closes #259.