Made it object oriented with class support