Improve `StockData` factory and `main` controller