[dylan] Restructure library generator a bit, add registry entry creation.