Refactor code
Add component Factory