Changed class to trait