I don't like having the if/else here. Can we change this function to addDefinitionWithParameters(definition, listToAddTo)?