Refactor graphics driver to prepare future upgrade :)