Add server changing function.
Do some replacements to improve compatibility.
Do some structure changes.