Fixing code so that we use interfaces instead of implementations in signatures