improve readability of stanby-namenode support code