Fix bug in ddlib.
Add generic feature library