Move class variable to function.