Refactoring of has_closed_subring_*() functions.
Refactor combine_rings() function.
Renaming of some functions.
Do not return a value from void function.