Tidy up parse_csv parsing and use it in Server