Add before:render, render, before:close, and close events. Also normalizing on-prototype callback names