Restructure into a class.