Several changes to make the Pendragon core library work.