remove unsafeWindow (#499, #509)

Getting close, I could use some help. Connections are drawing but not the circles and triangles.