Code cleanup in graphic package