Tidy up split_commas function and use it in Server