refactoring according to DeclarativeGraphics Graphic and Frame refactoring