Redesigned template related classes to ensure only that one instance of the JavaFormat class and one instance of the MergeVisitor class needs to be created