better markdown output for functions; footer stuff