Refactor of graphics protocols