convert to kobj and re-organize some of iflib.c