Fix security issue and events documentation

See #73 and #74