Refactored code, removed unnecessary methods and corrected the Parameter
issue with LazyTree shapes.