code cleanup lib/indicators_logic.rb