Updated RDiscount, added footnotes and other extensions