This change moves the static methods into functions in an effort to reduce complexity and improve readability.