Merge server refactor into task queue