First pass at extracting csv_model from internal codebase.

Ready for review.