Adding some comments, and float to demoninator of the function get_residue_percentate()