moved server into its own dir, moved util functions to their own file