Refactor everything. Add Matrix-construction-helper.