Remove traces and bind drop event

Ugly commit with a lot of changes:
  - reindent
  - cleanup
  - functionals
  - ...