Add missing $self and explicit return
Add tests