Changing link generation method

Changing the method to a more broken down method in an attempt to make more open.