Refactored using "code-generator" component and "dql-fit"

Refactored using "code-generator" component and "dql-fit"