Started work on extracting field names

Started to improve the get_fields function (renamed from read_fields) to handle more than just *. It reads the first name in a comma delimited, space seperated list of field names but segfaults after getting that first one.