Added some hooks to enable extension

Can set user capability required to edit; add custom xe fields; some
minor fixes/streamlining