Move `make_X` to `utils`; minor changes