Expands GenericTree class with switch cases in constructor and inserValue methods.