Building factor and subfactor JSON in progress