Made csv generator a class, cleaned up other files