Added component.json and fixed codegen to be component friendly