CShapeUnit refactoring