Refactor get stock list functions