Fixes #8. Additionally, the get_linkage_rules function orders the linkage rules by id