refactory source structure