Switch from functions to variables to encapsulate python2/3 differences