Change makenode to set type instead of seperate assignment