T_rex.rb: cleanup (still a mess)