Converting file to a class

Fixed a few things ;)