Added Id everywhere and moved some init code in server.