Further changes when implementing the first server (deploy-only) to use the new api

Re-organize a bit