Add events. Add clearOnLoad option