Moving array functions to be class methods