Wrapped server stuff in functions and let parallel listen to it.