Refactor cl.rb