Add auxiliary private functions to improve readability (hopefully)