More cross-server code cleanup, bug fixes