Cleaned up counter.rb