no need to change call context in optimist when we don't use this in any queued functions
moved regex declaration outside loop
fix scope chain calls to document
experimental support for DOMContentLoaded