Rewrote the file to be in a class.