initial support for endnotes added

adding basic support for endnotes.