Improved tool/device API a bit:

- make less use of explicit listener interfaces, but instead more
  use of events;
- added a name property to tasks in order to make them easier to
  identify;
- introduced some constants and simplified some of the UI code.