fixing instance cases 2 and 4 to wait for onload before grabbing node
Merging with most current master branch