Fixes for resolving by key or keyLabel
Update license header
Add unit test for directory model