Cleaned up code output in lab2
Remove previous independent line mechanism
factored output code into kgen out of main