fix an NPE. add a test.
Removed Def, combined with Binding. Now there is only one way to do it.