Fix solution 3: Refactor renders module in cleaner way and better organized methods and encapsulation and inheritance