Improved code for optional HTMLElement for renderEvery

Updated API docs
Refactored renderEvery