refactored Ref and S Sys, updated read filein in covert