Code cleanup.
Moved back the onclik handler registration in buildRendering.