Move following functionality to trait