Error handling improvements and CairoDef renamed as Drawer.