Some CSV server refactorings and clean'ups