add events.EventEmitter, fix some elements init.js