Further optimizations and extensions on the GDG Sprite library (gdgsprit example).