Convert into a class.
Delete extra getpaths.