use more cascades, some formatting cleanups
workaround blink bug