Cleaned up collector.rb