Converted to class

- Converted from a function to a class
- Allows for object oriented programming