Improved efficiency of Node and Element creation by creating loops in the class with init() methods