modularization of the helper.rb

changes in the rest of the places too match