added dupe code features, cleaned up iterate_lines, added unit test file