Refactored three js renderer