Fix binding logic, and NPEs
Fix tests to use lookup rather than name
Correct support for javax.naming.Context