Refactor lib/ransack/helpers/form_builder.rb

and code cleanup