cleaned up and made server compat changes