refactored and cleaned up update_all parts of index() in stocks_controller.rb