begin to seperate out kernel generation code from tests