restructure SNP parsing, add input/output comments for functions