Fixed a compiling error in Server.Core

Cleaned some code