Early returns are used to heavily reduce code indentation and clean up some code flow. No functional changes.