added server full handling + code formatting.