Restructured functions in to a class.