made read object class based.

Also started work on the horrible job of getting the UI to use
read_object