Added optional attach/detach event options