added construct function to class

deleted instance property being assigned to file outside of class and
automatically doing it with construct function