Fix subtle bug i just thought of
Move lines around
Rename callback to tempalateFunc
Made providing the extra spacing for sorting and adding new links dependent on whether they're showing