Added functionality to copy CSVs into the database. Refactored code. Not everything working.