added CSVValidator and peformed some cleanup
refactorings & error diagnosis