Use Integer to store tree numbers.

This way we overcome the limitation of Short.MAX_VALUE as the maximum number of trees.