Update text.class.js

Some changes to follow object class changes.