target: factor target_init() into pieces