Return information about CSV

This returns the content_type and encoding information about a CSV. Also just a general tidy up.