Simplify some of the shapes code.