Boilerplate InferTypes.
Created doOperations & fillInTree functions.