Adding handling for footnoteref

Closes #55