The linked article here goes over all of that in great detail!