Use list in kernel instead and some fixes.