Converted to events from delegates

- addDelegate, removeDelegate function removed
- on(event, function(){}); added
- documents and comments updated
- unit tests updated
- minified source updated
- ready updated.