Graphics code moved to 'Mode' parent class
Moved common part to class 'Mode'