moving some graphics-only code to separate module