renderer.py : Refactoring