Upgrade deps
Refactor processing stock logic