Some refactoring in DrawScene() function