Apply setAccessible(true) to constructor during initialisation.
Implement shallowCopy method for ReferenceArray.
Use ReferenceArray for Branch nodes.
Remove Ref inner class.
Remove some uneeded @SuppressWarnsings.
Remove unused imports.
Add license header.