Separated CSR / triplet code and made IO test go through