Improve class printing and fix TCLASS.equals