Big refactor/optimization of feeds_controller