Updated function and layout

added new setting for the reference label and better layout for the
footnote replacement