Ref.java changes are done.
The code is now more object oriented than before.