Refactor value picking within limits in application controller