Added definition json.
Fixed error.
Modify structure of definition.json.
add factories.