Added constants and the PopCount function.