moved server into it's own file