Intermediate checkin of refactoring for how shapes are handled.