refactored uniqify a bit to handle multiple files + added abstracted file reading