sort the attr defs by label. better handle events on the startup calls