Reorganize to easily support external servers