Tidy up split_commas function and use it in Server

Straightforward change
Reviewers: @rec @mtrippled