Creating a related object will link to it's parent automatically and removed some old code