Removing stuff i don't use and added some new events.
Tidy up and escape regex.