Parses input CSV files, working on database