Improvements to import_text to allow various header configurations