Optimised "get_href" to be more dynamic