Squashed commit of the following:

    make simple integration tests pass

    add num type switch
merged