Refactoring (causing small boost of rendering speed)