I'm trying to make a simple 2D editor with the following capabilities:

* Create/delete rectangles, polygons, circles, etc
* Hierarchical grouping of these shapes
* Move, rotate, scale these shapes
* Apply a certain texture to them (with UV coordinates for each vertex)

I've had some success, but the code is messy. Are they any simple projects or articles that I can read to get some more info on the kinds of data structures used for such projects?