Add some graphic functions; correct behavior of others; add new demos.