apps: support for reading figer data into factorization, with a lot of code sharing