Fixed kernel generation, uses append to nodes. Code compiles finally