Initial commit, already working code
forgot to add other test input file
completely rewrote and simplified. Now to do memory checks
nice and cleaned up