First pass at extracting csv_model from internal codebase.

Ready for review.
Ah I forgot they changed it between 2 and 2.1, thanks for the info