Implemented footnotes

+ a bit of polish